<ion-header>

  <ion-navbar>
    <ion-title>订单详情</ion-title>
  </ion-navbar>

</ion-header>

<ion-content>
  <div class="w12" style="padding-bottom:60px;">
    <div class="w12 font_size_large bgcolor_white mb10">
      <div class="jl_list">
        <div class="jl_list_item">
          <b class="w12">
            <i class="fa fa-map-marker mr5" style="color:#347eff;"></i>
            {{data.XXDZ}}
          </b>
          <span class="w12">{{data.KHXM}} / {{data.LXDH}}</span>
        </div>
      </div>
    </div>
    <div class="w12 font_size_large bgcolor_white mb10">
      <div class="jl_list">
        <div class="jl_list_item">
          <span class="w06">类型：{{data.DJLX}}</span>
          <span class="w06">单号：{{data.GDDH}}</span>
          <span class="w06">网点：{{data.WDMC}}</span>
          <span class="w06">时间：{{data.YYSJ}} {{data.YYSJD?data.YYSJD['value']:''}}</span>
          <span class="w06">订单来源：{{data.DDLY}}</span>
          <span class="w12" *ngIf="data.DJHM">业务单号：{{data.DJHM}}</span>
          <span class="w12">备注：{{data.KHMS}}</span>
        </div>
      </div>
    </div>
    <div class="w12 font_size_large bgcolor_white mb10">
      <div class="jl_list">
        <div class="jl_list_item pt10 pb10 bor_bottom" *ngFor="let sp of data.SPLB">
          <span class="w11">{{sp.SPMC}}</span>
          <span class="w01 tr font_gray">X {{sp.SL}}</span>
        </div>
      </div>

    </div>

    <div class="w12 font_size_large bgcolor_white mb10" *ngIf="data.PICTURE">
      <div class="jl_list">
        <div class="jl_list_item pt10 pb10 bor_bottom">
          <span class="mr10 mb10" style="width: 100px;height: 100px" *ngFor="let pic of data.PICTURE | LinkText">
            <img imageViewer style="width: 100%; height: 100%" [src]="pic">
          </span>
        </div>
      </div>
    </div>

    <div class="w12 font_size_large bgcolor_white mb10">
      <div class="jl_list">
        <div class="jl_list_item pt10 pb10 bor_bottom" *ngFor="let tm of data.TXM">
          <span class="w04">{{tm.LX}}</span>
          <span class="w08 tr font_gray">{{tm.CODE}}</span>
        </div>
      </div>
    </div>
    <div class="w12 bgcolor_white">
      <div class="logistics_item" *ngFor="let event of events;let i = index">
        <em [class.xuan]="i==0"></em>
        <div class="logistics_item_info bor_bottom">
          <!--<b class="w12">操作人：张无敌<span class="ml10">手机：<a href="tel:13797196188">13797196188</a></span></b>-->
          <span class="w12">{{event.NAME}}</span>
          <span class="w12 font_gray">{{event.CREATED}}</span>
        </div>
      </div>
    </div>
  </div>
</ion-content>
<ion-footer>
  <ng-container *ngIf="param.GDLC=='DPG'">
    <div class="mbatch_footer">
      <button (click)="dispatch()">派单</button>
      <button (click)="grabOrders()" [disabled]="param.STATUSID == 'GRABED'">抢单派工</button>
    </div>
  </ng-container>
  <ng-container *ngIf="param.GDLC=='XXSH'">
    <div class="mbatch_footer">
      <button (click)="makeOrderCheck(4)">撤单</button>
      <button (click)="makeOrderCheck(3)">改派</button>
      <button (click)="makeOrderCheck(2)">作废</button>
      <button (click)="makeOrderCheck(0)">完工</button>
    </div>
  </ng-container>
</ion-footer>
